/**
 * @author 陈泰来
 * @version V1.0
 * @Project echo-java-base
 * @Title
 * @Description *
 * @Package designmodel.factorymodel.abstractFac.client
 * @date 2020/10/27 1:49 下午
 * @Copyright:学如逆水行舟，不进则退 .
 */
package designmodel.factorymodel.abstractFac.client;

import designmodel.factorymodel.abstractFac.factory.AbstractFactory;
import designmodel.factorymodel.abstractFac.factory.concret.AppleFactory;
import designmodel.factorymodel.abstractFac.factory.concret.XiaoMiFactory;
import designmodel.factorymodel.abstractFac.model.AbstractPc;
import designmodel.factorymodel.abstractFac.model.AbstractPhone;

public class AbsClientTest {
    public static void main(String[] args) {
        //既抽象工厂 也 抽象产品

        AbstractFactory appleFactory = new AppleFactory();
        AbstractPc mac = appleFactory.makePc();
        AbstractPhone iphone = appleFactory.makePhone();
        mac.displayPc();
        iphone.displayPhone();


        AbstractFactory xiaoMiFactory = new XiaoMiFactory();
        AbstractPc redmiBook = xiaoMiFactory.makePc();
        AbstractPhone miPhone = xiaoMiFactory.makePhone();
        redmiBook.displayPc();
        miPhone.displayPhone();

    }

}
